#pragma once

#include "cartographer/rcm/imu/common.h"
#include "cartographer/rcm/imu/options.h"
#include "cartographer/rcm/imu/complementary_filter.h"

namespace cartographer
{
    class ComplementaryFilterWrap
    {
    public:
        ComplementaryFilterWrap();

        bool Initiate();

        bool Update(const sensor::ImuData &imu_raw);

        void GetFilteredImu(sensor::ImuData &imu_raw);

        bool initialized_ = false;
        common::Time time_prev_;
        ComplementaryFilter filter_;
    };
} // namespace cartographer